package com.example.vehiclefabric;

import cn.hutool.core.codec.Base64;
import cn.hutool.crypto.SecureUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

import java.security.KeyPair;

/**
 * @name: VehicleFabricApplication
 * @description: 服务端启动类。
 * @author: Lulu Zhao
 **/
@SpringBootApplication
@EnableConfigurationProperties
public class VehicleFabricApplication {

    public static KeyPair pair = SecureUtil.generateKeyPair("SM2");
    public static String publicKey = Base64.encode(pair.getPublic().getEncoded());
    public static String privateKey = Base64.encode(pair.getPrivate().getEncoded());
    public static boolean firstLoginFlag = false;

    /**
     * @name: main
     * @description: 服务端程序入口函数。
     * @params: [args]
     * @return: void
     * @author: Lulu Zhao
     */
    public static void main(String[] args) {
        SpringApplication.run(VehicleFabricApplication.class, args);
    }

}
